package com.android.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


public class Good implements Serializable {

    private String addr;
    private String appKey;
    private String avatar;
    private String content;
    private String username;
    private String typeName;
    private Long createTime;
    private Long id;
    private Long imageCode;
    private List<String> imageUrlList;
    private Integer price;
    private Integer status;
    private Long tUserId;
    private Long tuserId;
    private Long userId;
    private Integer typeId;
    private List array;

    public void setImageUrlList(List<String> imageUrlList) {
        this.imageUrlList = imageUrlList;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Good() {
    }

    protected Good(Parcel in) {
        addr = in.readString();
        appKey = in.readString();
        avatar = in.readString();
        content = in.readString();
        username = in.readString();
        typeName = in.readString();
        if (in.readByte() == 0) {
            createTime = null;
        } else {
            createTime = in.readLong();
        }
        if (in.readByte() == 0) {
            id = null;
        } else {
            id = in.readLong();
        }
        if (in.readByte() == 0) {
            imageCode = null;
        } else {
            imageCode = in.readLong();
        }
        if (in.readByte() == 0) {
            price = null;
        } else {
            price = in.readInt();
        }
        if (in.readByte() == 0) {
            status = null;
        } else {
            status = in.readInt();
        }
        if (in.readByte() == 0) {
            tUserId = null;
        } else {
            tUserId = in.readLong();
        }
        if (in.readByte() == 0) {
            tuserId = null;
        } else {
            tuserId = in.readLong();
        }
        if (in.readByte() == 0) {
            typeId = null;
        } else {
            typeId = in.readInt();
        }
    }

//    public static final Creator<Good> CREATOR = new Creator<Good>() {
//        @Override
//        public Good createFromParcel(Parcel in) {
//            return new Good(in);
//        }
//
//        @Override
//        public Good[] newArray(int size) {
//            return new Good[size];
//        }
//    };

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getImageCode() {
        return imageCode;
    }

    public void setImageCode(Long imageCode) {
        this.imageCode = imageCode;
    }

    public List getImageUrlList() {
        return imageUrlList;
    }

    public void setImageUrlList(ArrayList imageUrlList) {
        this.imageUrlList = imageUrlList;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long gettUserId() {
        return tUserId;
    }

    public void settUserId(Long tUserId) {
        this.tUserId = tUserId;
    }

    public Long getTuserId() {
        return tuserId;
    }

    public void setTuserId(Long tuserId) {
        this.tuserId = tuserId;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public List getArray() {
        return array;
    }

    public void setArray(List array) {
        this.array = array;
    }

//    @Override
//    public int describeContents() {
//
//        return 0;
//    }
//
//    @Override
//    public void writeToParcel(Parcel dest, int flags) {
//        dest.writeString(addr);
//        dest.writeString(appKey);
//        dest.writeString(avatar);
//        dest.writeString(content);
//        dest.writeString(username);
//        dest.writeString(typeName);
//        dest.writeLong(createTime);
//        dest.writeLong(id);
//        dest.writeLong(imageCode);
//        dest.writeList(imageUrlList);
//        dest.writeInt(price);
//        dest.writeInt(status);
//        dest.writeLong(tUserId);
//        dest.writeLong(tuserId);
//        dest.writeInt(typeId);
//        dest.writeList(array);
//
//    }
}
